home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Panorama / Panorama - Disk 19D (1987-07-22)(Pacific North-West Amigas Club)[WB].zip / Panorama - Disk 19D (1987-07-22)(Pacific North-West Amigas Club)[WB].adf / PipeHandler1.2 / pipesched.h < prev    next >
C/C++ Source or Header  |  1987-06-28  |  2KB  |  57 lines

  1. /****************************************************************************
  2. **  File:       pipesched.h
  3. **  Program:    pipe-handler - an AmigaDOS handler for named pipes
  4. **  Version:    1.1
  5. **  Author:     Ed Puckett      qix@mit-oz
  6. **
  7. **  Copyright 1987 by EpAc Software.  All Rights Reserved.
  8. **
  9. **  History:    05-Jan-87       Original Version (1.0)
  10. **        07-Feb-87    Added "lockct" check in CheckWaiting().
  11. */
  12.  
  13.  
  14.  
  15. typedef enum iotype
  16.   { PIPEREAD,
  17.     PIPEWRITE,
  18.     PIPERW
  19.   }
  20. IOTYPE;
  21.  
  22.  
  23. struct pipewait
  24.   { BYTE    *buf;        /* the next position for read/write */
  25.     ULONG   len;         /* the remaining length t read/write */
  26.     IOTYPE  reqtype;     /* PIPEREAD or PIPEWRITE only */
  27.   };
  28.  
  29.  
  30. struct tapwait
  31.   { struct DosPacket   *clientpkt;     /* the client's packet */
  32.     struct FileHandle  *handle;        /* the associated filehandle */
  33.   };
  34.  
  35.  
  36. union pktinfo
  37.   { struct pipewait  pipewait;     /* for packet waiting on pipe */
  38.     struct tapwait   tapwait;      /* for packet waiting on tap */
  39.   };
  40.  
  41.  
  42. typedef struct waitingdata
  43.   { PIPELISTNODE      link;        /* for list use */
  44.     struct DosPacket  *pkt;        /* the packet we are waiting on */
  45.     union pktinfo     pktinfo;     /* data pertaining to the waiting request */
  46.   }
  47. WAITINGDATA;
  48.  
  49.  
  50.  
  51. extern void              StartPipeIO    ( /* pipe, pkt, iotype */ );
  52. extern void              CheckWaiting   ( /* pipe */ );
  53. extern struct DosPacket  *AllocPacket   ( /* ReplyPort */ );
  54. extern void              FreePacket     ( /* pkt */ );
  55. extern void              StartTapIO     ( /* pkt, Type, Arg1, Arg2, Arg3, Handler */ );
  56. extern void              HandleTapReply ( /* pkt */ );
  57.